package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

type messageRouter struct {
}

func (m *messageRouter) messageRouterGroup(Router *gin.RouterGroup) *gin.RouterGroup {
	messageApi := api.MessageApi{}
	message := Router.Group("admin")
	{
		message.POST("upload/headImg", messageApi.UploadImg)                    //管理员上传图片
		message.POST("create/announcement", messageApi.CreateAnnouncement)      //管理员创建通告
		message.POST("query/announcement", messageApi.QueryAnnouncement)        //管理员查询通告
		message.GET("query/announcementById", messageApi.QueryAnnouncementById) //管理员根据id查询公告
		message.POST("update/announcement", messageApi.ChangeAnnouncement)      //管理员修改通告
		message.POST("delete/announcement", messageApi.DeleteAnnouncement)      //管理员删除通告
	}
	return message
}
